<?php
/* @var $this PageController */
/* @var $model Page */

$this->breadcrumbs=array(
	'Pages'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'List Page', 'url'=>array('index')),
	array('label'=>'Create Page', 'url'=>array('create')),
);

$cs = Yii::app ()->clientScript;
$cs->registerScript('#yw2',
		"
		$(document).ready(function(){
 		   $('#main-nav .nav-top-item').eq(0).removeClass('current');
		   $('#yw1').css(\"display\",\"none\");
		   $('#yw2').css(\"display\",\"none\");
		   $('#yw3').css(\"display\",\"block\");
		   $('#main-nav .nav-top-item').eq(2).addClass('current');
		});
"
);
?>
   <div class="content-box">
      <!-- Start Content Box -->
      <div class="content-box-header">
        <h3>留言管理</h3>
        <ul class="content-box-tabs">
          <li><a class="default-tab current" href="<?php echo $this->createUrl('/backend/page')?>">页面管理</a></li>
          <li><a href="<?php echo $this->createUrl('/backend/addpage')?>">增加页面</a></li>
        </ul>                 
        <div class="clear"></div>
      </div>
      <!-- End .content-box-header -->
      <div class="content-box-content">
        <div class="tab-content default-tab" id="tab1">  

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'page-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'page_title',
		'page_modified',
		array(
		'header'=>'操作',
		'class'=>'CButtonColumn',
		'template'=>'{update}',
		'htmlOptions'=>array(
				'style'=>'text-align:center;  vertical-align:middle',
			),
			'buttons' => array(
					'update'=>array(
							'label'=>'更新',
							'url'=>'array("/backend/updatepage/$data->ID")',
					),		
			),
		),
	),
)); ?>

	</div>
        <!-- End #tab1 -->
        <div class="tab-content" id="tab2">         
            <fieldset>
		
            </fieldset>
            <div class="clear"></div>
            <!-- End .clear -->          
        </div>
        <!-- End #tab2 -->
      </div>
      <!-- End .content-box-content -->
    </div>
    <!-- End .content-box -->